<!--编辑栏目-->
<div class="dialog_content">
	<form id="info_form" action="{:U('PositionCate/edit')}" method="post">
	<table width="100%" class="table_form">
        <tr>
            <th>推荐位名称 :</th>
            <td><input type="text" name="title" id="title" class="input-text" value="{$info.title}" size="30"></td>
        </tr>
        <tr>
            <th>所属模型 :</th>
            <td>
                <volist name="model" id="vo">
                    <label><input type="radio" name="model" value="{$key}" <if condition="$key eq $info['model']"> checked="checked"</if>> {$vo}</label>&nbsp;&nbsp;
                </volist>
            </td>
        </tr>
	    <tr>
			<th>{:L('enabled')} :</th>
			<td>
				<label><input type="radio" name="status" value="1" <if condition="$info.status eq 1">checked</if> > {:L('yes')}</label>&nbsp;&nbsp;
				<label><input type="radio" name="status" value="0" <if condition="$info.status eq 0">checked</if> > {:L('no')}</label>
			</td>
		</tr>

	</table>
	<input type="hidden" name="id" value="{$info.id}" />
	</form>
</div>
<script>
    $(function(){
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#title").formValidator({onshow:'填写推荐位名称',onfocus:'填写推荐位名称'}).inputValidator({min:1,onerror:'填写推荐位名称'});

        $('#info_form').ajaxForm({success:complate,dataType:'json'});
        function complate(result){
            if(result.status == 1){
                $.dialog.get(result.dialog).close();
                $.pinphp.tip({content:result.msg});
                window.location.reload();
            } else {
                $.pinphp.tip({content:result.msg, icon:'alert'});
            }
        }


    });
</script>